package com.kaishengit.dao;

import java.util.List;

import com.kaishengit.dao.core.BaseDao;
import com.kaishengit.pojo.Contacts;
import com.kaishengit.pojo.Mail;

public class MailDao extends BaseDao<Mail, String> {
    public void deleteByContacts(Contacts contacts) {
        String mailHql = "from Mail where contacts = ?";
        List<Mail> mailList = find(mailHql, contacts);
        for (Mail mail : mailList) {
            getSession().delete(mail);
        }
    }
}
